package com.project.genesis.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PASSWORD_IS_EMPTY(202, "密码不能为空"),

    INSERT_FAIL(204, "添加失败"),
    INSERT_IS_EMPTY(204, "添加数据不能为空"),
    ADMIN_USER_UPDATE_FAIL(204, "用户信息更新失败"),
    ADMIN_USER_ROLE_UPDATE_FAIL(204, "用户角色更新失败"),
    ADMIN_USER_WARD_UPDATE_FAIL(204, "用户病区更新失败"),

    DATA_NOT_EXIST(205, "该数据已删除或不存在"),
    DATA_IN_PATIENT(205, "请选择本系统的患者进行添加"),
    DATA_EXIST(205, "该数据已存在"),

    DATA_EFFECT_DAY(205, "随访问卷有效时间未设置"),
    DATA_CYDY_OR_MZCF(205, "出院带药跟门诊处方为空"),
    DATA_STATUS(205, "患者管理状态已关闭"),
    DATA_TEL(205, "手机号为空"),
    DATA_ADD_FILED(205, "添加失败"),
    ACCOUNT_EXISTS(207, "该账号已存在"),
    ADMIN_NAME_EXISTS(207, "用户名不可编辑重复名称"),
    NOT_ONESELF(207, "你不是本人"),
    LOGIN_LOCK_FIVE(207, "你已经失败五次，请十分钟后重试"),
    DEPT_EXISTS(207, "该科室已存在"),
    DEPT_NOT_EXISTS(207, "该科室不存在或已删除"),
    ROLE_EXISTS(207, "该角色已存在"),
    ROLE_NOT_EXISTS(207, "该角色不存在或已删除"),
    WARD_EXISTS(207, "该病区已存在"),
    GROUP_EXISTS(207, "该分组已存在"),
    FORM_COMMIT_EXISTS(207, "您已提交过该表单"),
    ADMIN_USER_ID_NOT_EXISTS(207, "用户不存在或已停用，请联系管理员"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    TOKEN_ERROR(210, "token异常，请重新登录"),

    CODE_ERROR(210, "密码错误"),
    CODE_NAME_EXITS(210, "编号跟名称不许重复"),
    LOGIN_DISABLED_ERROR(212, "改用户已被禁用"),
    LOGIN_ACL(215, "没有权限"),
    LOGIN_NOT_EXISTS(216, "账号不存在"),

    PATIENT_NAME_NOT_EXISTS(216, "成员信息错误"),

    SIGN_ERROR(300, "签名错误"),
    FORM_EXISTS(302, "表单已存在"),
    FORM_NOT_EXISTS(302, "表单不存在"),
    FORM_RULE_NOT_EXIST(302, "表单规则不存在"),
    LIST_ISNULL(303, "集合不存在"),
    DICTIONARY_EXISTS(303, "字段已存在"),
    ADMIN_DICTIONARY_CONFIG(204, "字典配置更新失败"),

    PASSWORD_FAIL(204, "设置密码失败"),
    INSERT_IS_REPEAT(205, "数据重复"),
    CONTEXT_IS_DELETE(209, "该数据状态已删除"),

    USER_QUESTIONNAIRE_NOT_COMMIT(209, "该用户没有提交过调查问卷"),

    ID_IS_EXISTS(666, "身份证已存在"),
    ID_NOT_EXISTS(666, "身份证不存在"),

    PUSH_ERROR(300, "推送失败"),

    WARD_ID(300, "病区ID为空"),

    ONE_SELF_EXISTS(999, "本人不可重复添加"),
    FAMILY_SELF_EXISTS(999, "家属添加已满"),
    VO_ISNULL(226, "返回VO为空"),
    ZHI_NE(226, "传个appUserId啊??"),
    MEMBER_ISNULL(619, "成员不存在"),
    TOO_MANY_REGISTRATIONS(303, "今日注册已达上限，无法再进行注册"),


    UPDATE_FILED(201, "更新失败"),
    ;

    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
